package com.itheima.demo3;

class X {
    Y b = new Y();  //成员变量
    public X() {
        super();
        System.out.print("X");
    }
}

class Y {
    public Y() {
        System.out.print("Y");
    }
}

class kengdie extends X {
    Y y = new Y();

    public kengdie() {
        super();
        System.out.print("坑爹");
    }

    public static void main(String[] args){
        new kengdie();
    }
}
